import * as os from "os";

export function indexTemplate (title){
    return (
`
/***********#**************
 * Author = ${os.userInfo().username}
 * createTime = 2022/12/1 10:52
 * describe = ${title}数据文件
 * ---------meta数据---------
 * 
 * ***********#**************/
import ${title}Html from './html.jsx';
function ${title}(){
    const childProps = {
        
    }
    return <${title}Html {...childProps}></${title}Html>
}
export default ${title};`
    )
}

export function HtmlTemplate (title){
    return (
        `
export default function ${title}Html(props){
    return (
        <div>
            这是${title}页面
        </div>
    )
}
        `
    )
}

export function routesTemplate(content){
    return `import toRightRouter from "../tools/toRightRouter.js";
${content}
export default toRightRouter(routes);
export {routes}
    `
}